00001 // Emacs Mode Line: -*- Mode:c++;-*- 00002 // ------------------------------------------------------------- 00003 /* 00004 * Copyright (c) 2013 Battelle Memorial Institute 00005 * Licensed under modified BSD License. A copy of this license can be found 00006 * in the LICENSE file in the top level directory of this distribution. 00007 */ 00008 // ------------------------------------------------------------- 00009 // ------------------------------------------------------------- 00010 /** 00011 * @file lpfile_optimizer_implementation.hpp 00012 * @author William A. Perkins 00013 * @date 2016-12-08 14:33:44 d3g096 00014 * 00015 * @brief 00016 * 00017 * 00018 */ 00019 // ------------------------------------------------------------- 00020 00021 00022 #ifndef _lpfile_optimizer_implementation_hpp_ 00023 #define _lpfile_optimizer_implementation_hpp_ 00024 00025 #include <iosfwd> 00026 #include <string> 00027 #include "file_optimizer_implementation.hpp" 00028 00029 namespace gridpack { 00030 namespace optimization { 00031 00032 00033 00034 // ------------------------------------------------------------- 00035 // class LPFileOptimizerImplementation 00036 // ------------------------------------------------------------- 00037 class LPFileOptimizerImplementation 00038 : public FileOptimizerImplementation 00039 { 00040 public: 00041 00042 /// Default constructor. 00043 LPFileOptimizerImplementation(const parallel::Communicator& comm) 00044 : FileOptimizerImplementation(comm) 00045 {} 00046 00047 /// Destructor 00048 ~LPFileOptimizerImplementation(void) 00049 {} 00050 00051 protected: 00052 00053 /// Specialized way to configure from property tree 00054 void p_configure(utility::Configuration::CursorPtr props); 00055 00056 /// Specialized way to set file name 00057 void p_setFilename(std::string file); 00058 00059 /// Write an LP file to the specified stream 00060 virtual void p_write(const p_optimizeMethod& m, std::ostream& out); 00061 00062 }; 00063 00064 00065 } // namespace optimization 00066 } // namespace gridpack 00067 00068 00069 #endif